package community.hospital.convert;

import community.hospital.entity.Hospital;
import community.hospital.entity.request.HospitalRequest;
import community.hospital.entity.response.HospitalOptionResp;
import community.hospital.entity.response.HospitalResponse;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @Author：ydj
 * @Date：2023/1/27 15:15
 */
@Mapper
public interface HospitalConvert {
    HospitalConvert INSTANCE = Mappers.getMapper(HospitalConvert.class);

    HospitalResponse convertToResp(Hospital hospital);

    Hospital convertToHospital(HospitalRequest request);
    @Mapping(source = "id",target = "hospitalId")
    HospitalOptionResp convertToHospitalOption(Hospital hospital);

}
